home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / fgl110c.zip / 09-17.C < prev    next >
Text File  |  1992-01-31  |  736b  |  39 lines

  1. #include <fastgraf.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4.  
  5. void main(void);
  6.  
  7. char arrow_white[] = {
  8.    0x00,0x0C,0x00, 0x00,0x0F,0x00, 0xFF,0xFC,0xC0,
  9.    0xC0,0x00,0x30, 0xFF,0xFC,0xC0, 0x00,0x0F,0x00,
  10.    0x00,0x0C,0x00
  11.    };
  12.  
  13. char arrow_black[] = {6,1,9,2,2,9,1,19,7,2,8,1};
  14.  
  15. void main()
  16. {
  17.    int old_mode;
  18.  
  19.    if (fg_testmode(4,1) == 0) {
  20.       printf("This program requires a 320 ");
  21.       printf("x 200 CGA graphics mode.\n");
  22.       exit(1);
  23.       }
  24.  
  25.    old_mode = fg_getmode();
  26.    fg_setmode(4);
  27.  
  28.    fg_setcolor(2);
  29.    fg_rect(0,319,0,199);
  30.  
  31.    fg_move(10,10);
  32.    fg_drawmask(arrow_black,12,10);
  33.    fg_drwimage(arrow_white,3,7);
  34.    fg_waitkey();
  35.  
  36.    fg_setmode(old_mode);
  37.    fg_reset();
  38. }
  39.